package com.ruoyi.project.charging.service;

import java.util.List;
import com.ruoyi.project.charging.domain.TChargingMqttMsg;

/**
 * 岸电MQTT消息原始数据Service接口
 * 
 * @author Yaoxuan Mo
 * @date 2025-07-28
 */
public interface ITChargingMqttMsgService 
{
    /**
     * 查询岸电MQTT消息原始数据
     * 
     * @param msgid 岸电MQTT消息原始数据主键
     * @return 岸电MQTT消息原始数据
     */
    public TChargingMqttMsg selectTChargingMqttMsgByMsgid(String msgid);

    /**
     * 查询岸电MQTT消息原始数据列表
     * 
     * @param tChargingMqttMsg 岸电MQTT消息原始数据
     * @return 岸电MQTT消息原始数据集合
     */
    public List<TChargingMqttMsg> selectTChargingMqttMsgList(TChargingMqttMsg tChargingMqttMsg);

    /**
     * 新增岸电MQTT消息原始数据
     * 
     * @param tChargingMqttMsg 岸电MQTT消息原始数据
     * @return 结果
     */
    public int insertTChargingMqttMsg(TChargingMqttMsg tChargingMqttMsg);

    /**
     * 修改岸电MQTT消息原始数据
     * 
     * @param tChargingMqttMsg 岸电MQTT消息原始数据
     * @return 结果
     */
    public int updateTChargingMqttMsg(TChargingMqttMsg tChargingMqttMsg);

    /**
     * 批量删除岸电MQTT消息原始数据
     * 
     * @param msgids 需要删除的岸电MQTT消息原始数据主键集合
     * @return 结果
     */
    public int deleteTChargingMqttMsgByMsgids(String[] msgids);

    /**
     * 删除岸电MQTT消息原始数据信息
     * 
     * @param msgid 岸电MQTT消息原始数据主键
     * @return 结果
     */
    public int deleteTChargingMqttMsgByMsgid(String msgid);
    
    /**
     * 查询所有未转换的原始数据
     * 
     * @return
     */
    public List<TChargingMqttMsg> selectAllTChargingMqttMsgNotConvert();

    /**
     * 原始数据MQTT报文转换
     * 
     * @param tChargingMqttMsg
     */
    public void convertOriginalTChargingMqttMsg(TChargingMqttMsg tChargingMqttMsg);

    /**
     * 处理转换成功
     * 
     * @param tChargingMqttMsg
     */
    public void handleConvertSuccess(TChargingMqttMsg tChargingMqttMsg);
    
    /**
     * 处理转换失败
     * 
     * @param tChargingMqttMsg
     * @param failReason
     */
    public void handleConvertFail(TChargingMqttMsg tChargingMqttMsg, String failReason);
}
